#include "rules.h"
#include "utils.h"
#include <cctype>

#ifdef DEBUG
#include <iostream>
#endif

bool rule5(std::string key) {
    char nLettres = 0;
    for (int i = 0; i < key.length(); i++) {
        if (isalpha(key[i])) {
            nLettres++;
        } else {
            nLettres = 0; //Chiffre -> on recommence !
        }
        if (nLettres > 6) {
#ifdef DEBUG
#pragma omp critical
            std::cerr << key << " - R5 : " << (int) nLettres << std::endl;
#endif
            return false;
        }

    }
    return true;
}